package cn.qxq1.boot.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangying
 * @date 2020-07-09
 * @description
 */
@RestController
public class HelloController {
    @GetMapping("say")
    public String hello() {
        return "hello, boot";
    }

    @GetMapping("world")
    public String world(@RequestParam(value = "text",required = false) String text, @RequestParam(value = "rp",required = false) String rp){
        text = StringUtils.replace(text,rp,rp.toUpperCase());
        return text;
    }
}
